<link rel="stylesheet" href="/Public/Application/css/bootstrap.min.css">
<link rel="stylesheet" href="/Public/Application/css/common.css">
<script src="/Public/Application/js/jquery-1.11.3.min.js"></script>
<script src="/Public/Application/js/common.js"></script>

<!--关键字列表样式-->
<style>
	.clear {clear: both;}
	.keyword-table {width: 100%; margin-bottom: 10px;}
	.keyword-table td {width: 100%; border: 1px solid #ddd;}
	
	.keyword-title {padding: 5px; text-indent: 10px; font-size: 15px;}
	.keyword-item {display: block; margin-left: 10px; width: 400px; float: left;}
	.keyword-item span {float: left; margin: 0px 10px 10px 0px; padding: 3px 10px 5px; font-size: 15px;}
	
	.keyword-operate {display: block; float: right; margin-right:10px; text-align: center;}
</style>

<!-- 内容主体 -->

<div class="search-mar-box">
	<div class="right rightcontent">
		<form action="">
			<input name="op" type="hidden" value="<{$Think.get.op}>"/>
			<div class="form-inline">
				<div class="form-group" style="  width: 240px;display: inline-block;  float: left;">
					<div class="form-control" style="float: left;background: none;border: none;box-shadow: none;width: 100px;display: inline-block;">应用类型：</div>
					<select name="getmodule" class='form-control' style='width: 140px;display: inline-block;'>
						<option value="all">全部</a>
						<volist name="modules" id="row">
							<?php 
							if( $row['name'] == 'nearbycompany' || $row['name'] == 'fans' || $row['name'] == 'goodsticket' || $row['name'] == 'reward' || $row['name'] == 'shopping' || $row['name'] == 'score' || $row['name'] == 'yhm' || $row['name'] == 'redpacket'){
								continue;
							}
							?>
							<option value="<{$row['name']}>" <eq  name="row['name']" value="$Think.get.getmodule">selected=selected</eq>><{$row['title']}></option>
							
						</volist>
					</select>
				</div>
				<div class="form-group" style="  width: 200px;display: inline-block;">
					<div class="input-group">
						<input class="form-control" name="keyword" placeholder="应用标题" id="" type="text"  value="<{$Think.get.keyword}>">
	                  <span class="input-group-btn">
	                    <button class="btn btn-default" type="submit"><i class="glyphicon glyphicon-search"></i>筛选搜索</button>
	                  </span>
	                </div>
                </div>
			</div>
		</form>
	</div>
	<div class="clear"></div>
</div>



<!-- 关键字列表 -->
<volist name="list" id="row">
<table class="keyword-table">
<tr>
	<td class="keyword-title">
		<{$row['name']}>
		<small>
			（<{$cacheModules[$row['module']]['title']}>）
		</small>
		<span style='float:right;padding-right:10px;'>
		<eq  name="Think.get.op" value="welcome">
			<if condition ="is_array($account['welcome']) and $account['welcome']['id'] eq $row['id']" >
				<else/>
				<button  onclick="ajaxopen('<{:U('Rule/Setdefaultwelcome', array('id' => $row['id'], 'type' => 'welcome'))}>');return false;" switch="0" class="btn btn-default">选择</button>
			</if>
		</eq>
		<eq  name="Think.get.op" value="default">
			<if condition ="is_array($account['default']) and $account['default']['id'] eq $row['id']" >
				<else/>
				<button onclick="ajaxopen('<{:U('Rule/Setdefaultwelcome', array('id' => $row['id'], 'type' => 'default'))}>');return false;" switch="0" class="btn btn-default">选择</button>
			</if>
		</eq>
		</span>
	</td>
</tr>
<tr>
	<td class="keyword-list">
		<div class="keyword-item">
			<volist name="row['keywords']" id="kw">
			<span class="label label-success"><{$kw['content']}></span>
			</volist>
			<div class="clear"></div>
		</div>
		<div class="clear"></div>
	</td>
</tr>
</table>
</volist>

<{$pager}>
</div>

<script type="text/javascript">
/*
	请求远程地址
*/
function ajaxopen(url) {
	$.get(url, function(data){
		parent.message(data.info, data.url, data.status);
	});	
	return false;
}
</script>
